package designPattern.factory.abstractfactory.pizza;

import designPattern.factory.abstractfactory.factory.PizzaIngredientFactory;

public class PepperPizza extends Pizza {

    PizzaIngredientFactory ingredientFactory;

    public PepperPizza(PizzaIngredientFactory ingredientFactory) {
        this.ingredientFactory = ingredientFactory;
    }

    @Override
    public void prepare() {
        pepper = ingredientFactory.createPepper();
    }
}
